#ifndef _FT_ARQ_H
#define _FT_ARQ_H

#define ACK_PCKT_SIZE 2048 

#define CON_READY 0x1
#define CON_BUSY 0x2 
#define CON_DONE 0x4 
#define CON_DISCON 0x8

struct ft_arq_t 
{
  int sockfd;
  unsigned int winsz;
  unsigned int rtt;
  unsigned int dev;
  unsigned int pkt_size;
  unsigned int state;
  unsigned int nx_seq_num;
};

void ft_arq_setup(struct ft_arq_t*,int);
int ft_arq_send_file(struct ft_arq_t*, FILE*);
int ft_arq_recv_file(struct ft_arq_t*, FILE*);

#endif
